<?php
class Category_model extends CI_Model
{
    public function CheckSlug($slug)
    {
        $sql = "Select cate_name From tbl_category WHERE status = 0 AND url = '$slug' ";
        $query = $this->db->query($sql);
        if($query->result()) {
            return $query->result_array();
        }else {
            return false;
        }
    }

    public function getCateId($slug)
    {
        $sql = "Select cate_id From tbl_category WHERE status = 0 AND url = '$slug' ";
        $query = $this->db->query($sql);
        if($query->result()) {
            return $query->result_array();
        }else {
            return false;
        }
    }

    public function getCateIdProd($slug)
    {
        $sql = "Select cate_id From tbl_products WHERE status = 0 AND url = '$slug' ";
        $query = $this->db->query($sql);
        if($query->result()) {
            return $query->result_array();
        }else {
            return false;
        }
    }
}
?>